package com.project.service;

import com.project.entity.UserRole;

import java.util.List;

/**
 * @Author: TateBrown
 * @date: 2018/5/25 19:24
 * @param:
 * @return:
 */
public interface UserRoleService {
    int add(UserRole userRole);

    int addBatch(UserRole userRole);

    /**
     * author: WheelChen
     * date: 2017/11/7
     * function: 根据角色id批量删除用户分配
     *
     * @param roleid 角色id
     * @return
     */
    int removeBatchByRoleId(int roleid);

    List<UserRole> findByCondition(UserRole userRole);

    List<UserRole> findByRoleId(int roleid);

    //查用户所拥有的资源
    List<UserRole> findResourcesByUserId(Integer userid);

    /**
     * author: WheelChen
     * date: 2017/11/30
     * function: 根据角色id批量查找
     *
     * @param userid
     * @return
     */
    List<UserRole> findBatchByUserId(Integer userid);
}
